import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'

/** 路由模式 */
const history =
  import.meta.env.VITE_ROUTER_HISTORY === 'hash'
    ? createWebHashHistory(import.meta.env.VITE_PUBLIC_PATH)
    : createWebHistory(import.meta.env.VITE_PUBLIC_PATH)

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import('@/views/Index/index.vue')
  },
  {
    path: '/antv-sheet',
    name: 'antv-sheet',
    component: () => import('@/views/AntvS2/index.vue')
  }
]

const router = createRouter({
  history,
  routes
})

export default router
